package manage.action;

import m.common.action.ActionMeta;
import m.common.action.RequestMeta;
import m.system.util.JSONMessage;
import manage.model.AdminLogin;
import manage.service.AdminSettingService;

@ActionMeta(name="manage/adminSetting")
public class AdminSettingAction extends ManageAction{

    @RequestMeta(params = {"name","value"})
    public JSONMessage setAttr(String name,String value) throws Exception {
        AdminLogin admin=verifyAdminLogin();
        getService(AdminSettingService.class).setAttr(admin.getOid(),name,value);
        return new JSONMessage(0);
    }
}
